package com.jifeng.httporhttps;

import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

import javax.net.ssl.X509TrustManager;

/*
* 信任所有主机-对于任何证书都不做检查
*/
public class MytmArray implements X509TrustManager {
	public X509Certificate[] getAcceptedIssuers() {
		// return null;
		return new X509Certificate[] {};
	}

	@Override
	public void checkClientTrusted(X509Certificate[] chain, String authType)
			throws CertificateException {
		// TODO Auto-generated method stub

	}

	@Override
	public void checkServerTrusted(X509Certificate[] chain, String authType)
			throws CertificateException {
		// TODO Auto-generated method stub
		// System.out.println("cert: " + chain[0].toString() + ", authType: "
		// + authType);
	}
};
